package com.jsz.peini.mapper.label;

import java.util.LinkedHashMap;
import java.util.List;

import javax.ws.rs.DELETE;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;

import com.jsz.peini.bean.label.LabelCondition;
import com.jsz.peini.bean.label.LabelInfo;
import com.jsz.peini.bean.label.LabelUser;
import com.jsz.peini.bean.label.LabelUserExample;

public interface LabelUserMapper {
	//根据标签状态查询用户标签
	List<LinkedHashMap<String,Object>> selectLabelUserByUserInfoId(String UserInfoId);
	
	//插入用户标签
    int insertUserByUserId(LabelUser labelUser);
    //删除用户标签
    int deleteUserByUserId(LabelUser labelUser);
    int deleteLabelUserByUserId(String userId);
    //查询所有标签
    List<LabelInfo> selectAllInfo();
    //查询标签对应条件
    List<LabelCondition> selectAllCondition(Integer labelId);
    //查询用户已拥有的标签
    List<LabelUser> selectAllUser(String userId);
    
    int countByExample(LabelUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(LabelUser record);

    int insertSelective(LabelUser record);

    List<LabelUser> selectByExample(LabelUserExample example);

    LabelUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(LabelUser record);

    int updateByPrimaryKey(LabelUser record);
    
    @Update("update label_user set label_state = 0 where user_id = (#{userId})")
    void deleteAll(String userId);
    
    void updateBatch(String [] ids);
}